import React from 'react';
import './main.css'
import { Layout, Menu} from 'antd';

//路由（都需要配置在入口文件中）
import Home from '../router/home.js'
import Build from '../router/build.js'
import Down from '../router/download.js'
import {HashRouter,Route,Link} from 'react-router-dom'


const { Header} = Layout;


class Main extends React.Component{
 constructor(props){
     super(props);
     this.state = {

     }
    }
 
 render(){
     return(
      <HashRouter>
        <div className="main">
             <Layout>
               
    <Header className="header">
    <img src={[require("./image/icon.jpg")]} alt="" className="mainicon"/>
      
      <div className="logo" />
      <Menu theme="dark" mode="horizontal" defaultSelectedKeys={['1']}>
        <Menu.Item key="1">测试用例</Menu.Item>
        <Menu.Item key="2">用户手册</Menu.Item>
        <Menu.Item key="3"><Link to="/home">自动化测试</Link></Menu.Item>
        <Menu.Item key="4"><Link to="/down">文档链接</Link></Menu.Item>
      </Menu>
    </Header>
 
  </Layout>
        </div>
        <Route path="/home" component={Home} /> 
        <Route path="/build" component={Build} /> 
        <Route path="/down" component={Down} /> 
        </HashRouter>
     )
   
     

     }
 
 }

export default Main;